#include "semutil.h"
#define RESOURCE 0

int main() {
  int id = C(1);
  S(id, RESOURCE, 5);
  printf("resource num = %d\n", G(id, RESOURCE));

  P(id, RESOURCE);
  P(id, RESOURCE);
  printf("resource num = %d\n", G(id, RESOURCE));

  V(id, RESOURCE);
  printf("resource num = %d\n", G(id, RESOURCE));

  D(id);
  return 0;
}
